﻿using RaytracerLib;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Drawing;

namespace RaytracerTest
{
    [TestClass()]
    public class RectangleExtensionsTest
    {
        private TestContext testContextInstance;

        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        [TestMethod()]
        public void Rectangle_Scale()
        {
            Assert.AreEqual(new Rectangle(0, 0, 0, 0).Scale(5), new Rectangle(0, 0, 0, 0));
            Assert.AreEqual(new Rectangle(0, 0, 10, 20).Scale(5), new Rectangle(0, 0, 50, 100));
            Assert.AreEqual(new Rectangle(10, 20, 0, 0).Scale(5), new Rectangle(50, 100, 0, 0));
            Assert.AreEqual(new Rectangle(10, 20, 30, 40).Scale(5), new Rectangle(50, 100, 150, 200));

            Assert.AreEqual(new Rectangle(0, 0, 0, 0).Scale(5), new Rectangle(0, 0, 0, 0));
            Assert.AreEqual(new Rectangle(0, 0, 0, 10).Scale(5), new Rectangle(0, 0, 0, 50));
            Assert.AreEqual(new Rectangle(0, 10, 0, 0).Scale(5), new Rectangle(0, 50, 0, 0));
            Assert.AreEqual(new Rectangle(0, 10, 0, 20).Scale(5), new Rectangle(0, 50, 0, 100));

            Assert.AreEqual(new Rectangle(0, 0, 0, 0).Scale(5), new Rectangle(0, 0, 0, 0));
            Assert.AreEqual(new Rectangle(0, 0, 10, 0).Scale(5), new Rectangle(0, 0, 50, 0));
            Assert.AreEqual(new Rectangle(10, 0, 0, 0).Scale(5), new Rectangle(50, 0, 0, 0));
            Assert.AreEqual(new Rectangle(10, 0, 20, 0).Scale(5), new Rectangle(50, 0, 100, 0));
        }
    }
}
